<section *ngIf="msgDatalist">
  <ng-container *ngIf="notEsData">
    <ng-container *ngIf="chatService.myFriendData && chatService.myFriendData.listData && chatService.myFriendData.listData.length>0; else elseEmptyMsgListTemplate">
      <div class="container clearfix notEsData 1" *ngFor="let item of chatService.myFriendData.listData">
        <div class="img" appDebounceClick (debounceClick)="openModal(item)">
          <img src="{{item.friendAvatar}}" onerror="this.src='assets/img/head.png'">
          <ng-container *ngIf="item.hasNoRead">
            <div class="topBadge3"></div>
          </ng-container>
        </div>
        <div class="content" appDebounceClick (debounceClick)="openModal(item)">
          <div class="clearfix">
            <p class="nickname">{{item.friendName}}</p>
          </div>
          <img class="arrowImg" src="assets/fw/zzzs_icon_arrow_right@3x.png" alt="">
        </div>
      </div>
    </ng-container>
    <ng-template #elseEmptyMsgListTemplate>
      <div class="container clearfix notEsData 2">
        <p class="emptyData" *ngIf="showEmptyHintLabel">{{emptyHintLabel}}</p>
      </div>
    </ng-template>
    <ion-infinite-scroll threshold="100px" (ionInfinite)="loadData($event)">
      <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="正在加载更多数据...">
      </ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </ng-container>

  <!--新加邀约列表接口
  <ng-container *ngIf="!notEsData">
    <div class="container clearfix currentData" *ngFor="let item of msgDatalist">
      <ng-container *ngIf="item.button?.line">
        <div class="img" appDebounceClick (debounceClick)="callConsultantNow(item.button)">
          <img src="{{item.avatar_url}}" onerror="this.src='assets/img/head.png'">
          <ng-container *ngIf="item.isNew > 0">
            <div class="topBadge3"></div>
          </ng-container>
        </div>
        <div class="content" appDebounceClick (debounceClick)="callConsultantNow(item.button)">
          <div class="clearfix">
            <p class="nickname">{{item.nickname}}</p>
            <span class="datetime">{{item.datetime}}</span>
          </div>
          <div class="msg-line">
            <p *ngIf="item.msg" id="{{item.id}}" class="msg">{{item.msg.message}}</p>
            <button *ngIf="item.button" class="consult-btn" appDebounceClick (debounceClick)="go(item.button)">
              <span class="consult-btn-span">
                {{item.button.label}}
              </span>
            </button>
          </div>
        </div>
      </ng-container>

      <ng-container *ngIf="!item.button?.line">

        <ng-container *ngIf="item?.link?.type==='phone'">
          <div class="img" appDebounceClick (debounceClick)="call(item?.nickname,item?.link?.params?.number)">
            <img src="{{item.avatar_url}}" onerror="this.src='assets/img/head.png'">
            <span class="count" *ngIf="item.number && item.number!='0'">{{item.number}}</span>
          </div>
          <div class="content" appDebounceClick (debounceClick)="call(item?.nickname,item?.link?.params?.number)">
            <div class="clearfix">
              <p class="nickname">{{item.nickname}}</p>
              <span class="datetime">{{item.datetime}}</span>
            </div>
            <div class="msg-line">
              <p *ngIf="item.msg" id="{{item.id}}" class="msg">{{item.msg.message}}</p>
              <button *ngIf="item.button" class="consult-btn" appDebounceClick (debounceClick)="go(item.button)">
                <span class="consult-btn-span">
                  {{item.button.label}}
                </span>
              </button>
            </div>
          </div>
        </ng-container>

        <ng-container *ngIf="item?.link?.type!=='phone'">
          <div class="img" appDebounceClick (debounceClick)="openModal(item)">
            <img src="{{item.avatar_url}}" onerror="this.src='assets/img/head.png'">
            <span class="count" *ngIf="item.number && item.number!='0'">{{item.number}}</span>
          </div>
          <div class="content" appDebounceClick (debounceClick)="openModal(item)">
            <div class="clearfix">
              <p class="nickname">{{item.nickname}}</p>
              <span class="datetime">{{item.datetime}}</span>
            </div>
            <div class="msg-line">
              <p *ngIf="item.msg" id="{{item.id}}" class="msg">{{item.msg.message}}</p>
              <button *ngIf="item.button" class="consult-btn" appDebounceClick (debounceClick)="go(item.button)">
                <span class="consult-btn-span">
                  {{item.button.label}}
                </span>
              </button>
            </div>
          </div>
        </ng-container>

        <ng-container *ngIf="!item.link">
          <div class="img">
            <img src="{{item.avatar_url}}" onerror="this.src='assets/img/head.png'">
            <span class="count" *ngIf="item.number && item.number!='0'">{{item.number}}</span>
          </div>
          <div class="content">
            <div class="clearfix">
              <p class="nickname">{{item.nickname}}</p>
              <span class="datetime">{{item.datetime}}</span>
            </div>
            <div class="msg-line">
              <p *ngIf="item.msg" id="{{item.id}}" class="msg">{{item.msg.message}}</p>
              <button *ngIf="item.button" class="consult-btn" appDebounceClick (debounceClick)="go(item.button)">
                <span class="consult-btn-span">
                  {{item.button.label}}
                </span>
              </button>
            </div>
          </div>

        </ng-container>



      </ng-container>
    </div>
    <p class="noData" *ngIf="!msgDatalist || msgDatalist.length === 0">
      暂无数据
    </p>
    <ion-infinite-scroll threshold="100px" (ionInfinite)="loadData($event)"
      *ngIf="tagData?.data?.pageTotal>tagData?.data?.pageSize">
      <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="正在加载更多数据...">
      </ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </ng-container>
</section>-->